Limited accessed Shared Directory
2015/05/20 |
Install Samba to configure File Server.
This example shows to create a shared Folder which requires user authentication.
|
|
[1] | Install Samba. |
root@smb:~# apt-get -y install samba |
[2] | Configure Samba. |
root@smb:~# groupadd security root@smb:~# mkdir /home/security root@smb:~# chgrp security /home/security root@smb:~# chmod 770 /home/security
root@smb:~#
vi /etc/samba/smb.conf # line 25: add unix charset = UTF-8
# line 30: change (Windows' default) workgroup = WORKGROUP
# line 51: uncomment and change IP address you allow interfaces = 127.0.0.0/8 10.0.0.0/24
# line 58: uncomment bind interfaces only = yes # add to the end [Security]
# any name you like path = /home/security writable = yes create mode = 0770 directory mode = 0770 share modes = yes guest ok = no # guest not allowed valid users = @security # allow only security group # add a user in Samba root@smb:~# smbpasswd -a vervet New SMB password: # set password Retype new SMB password: Added user vervet. root@smb:~# usermod -G security vervet root@smb:~# systemctl restart smbd |
[3] | It's the way to access to the shared directory from Windows clients. This example is on Windows 8.1. Open Exproler and Select [My Computer] - [Map Network Drive]. |
[4] | Input as '\\(your server's hostname pr IP address)\(shared directory)'. |
[5] | Password is required. Input the one set in [1]. |
[6] | Just accessed. |